Skip to content

feat: improve the lazy loading tab#961

Merged
selul merged 13 commits into
developmentfrom
refactor/lazy-scaling-ui
Oct 1, 2025
Merged

feat: improve the lazy loading tab#961
selul merged 13 commits into
developmentfrom
refactor/lazy-scaling-ui

Conversation

@Soare-Robert-Daniel

@Soare-Robert-Daniel Soare-Robert-Daniel commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

All Submissions:

Changes proposed in this Pull Request:

Reorganize the lazy load and scaling settings:

Current status

CleanShot 2025-09-17 at 18 07 23@2x

Closes https://github.com/Codeinwp/optimole-service/issues/1559

How to test the changes in this Pull Request:

  1. Check if the changed settings are still working

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@Soare-Robert-Daniel

Soare-Robert-Daniel commented Sep 22, 2025

Copy link
Copy Markdown
Contributor Author

@selul @ineagu, here is how it looks for the Formbricks survey integration with the modal notice when a user tries to disable an important lazy load option.

Issue Reference: https://github.com/Codeinwp/optimole-service/issues/1551
Development Mode Survey: https://app.formbricks.com/environments/clo8wxwy044olpm0gn83ihta6/surveys/cmfv2kgzt0o2lvq019y7vh9y4/responses?referer=true

2025-09-22_15-38-15.mp4

@ineagu

ineagu commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

@Soare-Robert-Daniel can't we embed somehow the survey in the popup? if not it's fine

  1. The Keep enabled button, should be " keep enabled and get help" which would open in a new tab : https://optimole.com/contact/, prefilled with user site + subject : [Lazy load issue] which "lazy load" is the setting he is trying to disable.

What do you think?

Comment thread inc/tag_replacer.php

// // If the image is between the first images we add the fetchpriority attribute to improve the LCP.
if (
$this->settings->is_lazyload_type_fixed() &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should call this if viewport is enabled + optimization is not done for the current url || viewport is disabled.

@Soare-Robert-Daniel

Copy link
Copy Markdown
Contributor Author

@Soare-Robert-Daniel can't we embed somehow the survey in the popup? if not it's fine

I tried to use the embedded form of Formbricks, but it's pretty wacky. I do not recommend.

CleanShot 2025-09-22 at 17 19 40@2x
  1. The Keep enabled button, should be " keep enabled and get help" which would open in a new tab : https://optimole.com/contact/, prefilled with user site + subject : [Lazy load issue] which "lazy load" is the setting he is trying to disable.

I see Gravity Forms has a nice feature in which we can prefill with just the URL: https://docs.gravityforms.com/allow-field-to-be-populated-dynamically/

@ineagu

ineagu commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

okay, we can keep it as you are doing now.

@Soare-Robert-Daniel

Copy link
Copy Markdown
Contributor Author

@ineagu, here are the interactions with the new changes (including the notice with prefilling)

2025-09-23_16-39-37.mp4

For the skip lazy load number input selector, I had to put it separately from the text since the embedding was creating a weird focus issue.

CleanShot 2025-09-23 at 16 42 01@2x

@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review September 23, 2025 14:26
@pirate-bot

pirate-bot commented Sep 23, 2025

Copy link
Copy Markdown
Collaborator

Plugin build for 8c9de99 is ready 🛎️!

@rodica-andronache

rodica-andronache commented Sep 24, 2025

Copy link
Copy Markdown
  • from what I understand, Smart Image Scaling should be removed from the Resize panel, as right now it's duplicated, both in Resize and Lazyload
image image

@rodica-andronache

rodica-andronache commented Sep 26, 2025

Copy link
Copy Markdown

@Soare-Robert-Daniel

  • there are some small differences from the suggested texts
image image
  • on smaller screens, the notice looks like this, not sure if it's ok
image

@Soare-Robert-Daniel

Copy link
Copy Markdown
Contributor Author
  • there are some small differences from the suggested texts

Fixed

  • on smaller screens, the notice looks like this, not sure if it's ok

Yes. This is how the Gutenberg component behaves, which can also be verified in https://wordpress.github.io/gutenberg/?path=/docs/components-modal--docs, like in the screenshot below:

CleanShot 2025-09-30 at 17 25 13@2x

@Soare-Robert-Daniel

Copy link
Copy Markdown
Contributor Author

I added the Lear Mode link for https://github.com/Codeinwp/optimole-service/issues/1515 as part of the toggle description.

CleanShot 2025-10-01 at 15 32 24@2x

@rodica-andronache

Copy link
Copy Markdown

from what I've tested, it's working well

@selul selul merged commit a6ebbed into development Oct 1, 2025
11 checks passed
@selul selul deleted the refactor/lazy-scaling-ui branch October 1, 2025 19:23
@pirate-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants